﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Cashier
{
    public partial class ucItem : UserControl
    {
        private ItemEntry data;
        public ItemEntry Data {
            get {
                return data;
            }
            set
            {
                data = value;
                txt_Item_Category.Text = data != null ? data.CategoryId.ToString() : "";
                txt_Item_Code.Text = data != null ? data.Code : "";
                txt_Item_Name.Text = data != null ? data.Name : "";
                txt_Item_NameVN.Text = data != null ? data.NameVN : "";
                rTxt_Item_Description.Text = data != null ? data.Description : "";
                combo_Item_Unit.Text = data != null ? data.Unit : "";
            }
        }
        public ucItem()
        {
            InitializeComponent();
        }
    }
}
